package com.itheima.stream;

import java.util.stream.Stream;

public class Demo3 {
    public static void main(String[] args) {
        //Stream流的终结方法---------->1,forEach()-------->2,count()
        Stream<String> stream = Stream.of("a", "b", "c", "d", "c");
        stream.filter(s -> s.equals("a")).forEach(s -> System.out.println(s));
        //System.out.println(stream.count());

    }
}
